#打开读入文本
f = open('C:###########','r',enconding='utf-8')
line = f.read()
#把文本拆分成word
words = line.split()
new_words() = []
for words in words:
    new_words.append(word.replace(',','').replace(',','').r)
#统计列表中每个元素出现的次数
words_set = set(new_words)
words_dict ={}
for word in words_set:
    words_dict[word] = new_words.count(word)
sorted(words_dict.items(),key=lambda x:x[1],reverse=True)